<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="<?=BASEURL.CSS_DIR?>reset.css" media="screen"/>    
    <link rel="stylesheet" type="text/css" href="<?=BASEURL.CSS_DIR?>common.css" media="screen"/>
    <script type="text/javascript" src="<?=BASEURL.JS_DIR?>jquery.js" ></script>
	<script type="text/javascript">
	var currInd=<?=$currindex?>;
	var galData = eval('<?=$jsongal;?>');
	var newA;
	function loadImg(ind)
	{
		$('#image').attr('src',galData[ind].url);
		$('#image').attr('title',galData[ind].caption);
		//update pager
		if (newA!=undefined) 
			newA.removeClass("current");
		newA=$('#content a:eq('+ind+')');
		newA.addClass("current");
	}
	
    $(document).ready(function() {
    	loadImg(currInd);
    });
	</script>
	<style>
	a.current {
		color:#ff0000;
	}
	</style>
    <title>NimWiki :: <?=$galname?></title>
  </head>
  <body ondblclick="window.location='<?=site_url('/admin/gallerymgr/edit/'.$galname);?>'" >
<div id="page" >
    <div id="lateral">     
     
    </div>
    <div id="content">
      <img id="image" src="" width="" height="300" title="" />
      <div id="pager" >
      <?foreach($images as $key=>$image):?>
      		<a href="javascript:loadImg(<?=$key?>);" ><?=($key+1)?></a>
      <?endforeach;?>
      </div>
    </div>
    <div id="footer">
    copyright 2007, nicolas myers | <?=$this->benchmark->elapsed_time();?>s<br />
    </div>
</div>
</body>
</html>
